
#ifndef GLES2SPRITEBATCH_H
#define GLES2SPRITEBATCH_H

#include "LibraryEngineExport.h"
#include "Graphics/SpriteBatch.h"
#include "Graphics/Textures/Texture.h"
#include "Maths/Rectangle.h"
#include "Maths/Vector2.h"
#include "Graphics/Color.h"
#include "Graphics/SpriteTypes.h"

namespace CasaEngine
{
	class IRenderer;

	class GLES2SpriteBatch :
		public ISpriteBatch
	{
	public:
		GLES2SpriteBatch(const IRenderer* renderer_);
		~GLES2SpriteBatch();

		/// Enabled 2D primitive rendering by setting up the appropriate orthographic
		///  perspectives and matrices.
		virtual void Begin(int flags);

		/// Disables 2D rendering and restores the previous matrix and render states
		/// before they were modified.
		virtual void End();

		virtual void Draw(
			ITextureBase *Texture2D,
			CRectangle &PositionInTexture,
			Vector2I &Origin,
			Vector2F &Position,
			float Rotation,
			Vector2F &Scale,
			CColor &Color,
			float ZOrder,
			eSpriteEffects SpriteEffect);

	private:
		const IRenderer* m_pRenderer;
	};

} // namespace CasaEngine

#endif // GLES2SPRITEBATCH_H
